So in today's lesson, we are going to continue on with our hobby.
Okay, now if you have followed along from the last few lessons, we have completed stages 1 to 5 and
I've also done some coding where required in those stages as well.
So today we're going to be having a look just at the finish area okay.
This will be where the players will go once they're finished.
Almost like a reward I guess, for completing the obby.
So that's what we're going to be doing today.
Now, um, I'm going to be doing this in the finish section here, as you can see, and I've already
got a base plate here to use.
So let's duplicate this.
I'm going to move it over.
To about here.
Let's change.
I'm gonna make it.
I'm gonna make it a grass bottom.
But of course, you can change this however you like.
It's all just cosmetic for now.
Um, let's say sea green.
And again, because I can't change the size here directly.
Because if I was to, um, say 100, for example, it would then go into the rest of the stage.
So in that case, I want to, um, because I want to keep it where it is.
Um, oh, here we go.
Because I want to keep it where it is with touching this object.
I'm just going to scale it using the scale tool.
So that is, I guess, a good method to understand, um, what positives and negatives using the tool.
Sometimes it's better to use the tool rather than putting it in to the transform property.
Okay.
And let's make this nice and large.
Um.
100.
I think that looks quite nice.
And then do maybe 100 on the other side.
We can always adjust this based on what we want.
Okay.
Now, um, some ideas I had for this was to add maybe a nice modern house.
Um, some other, some other bits and asked to code, um, some walk speed parts.
So, so if you have played hobbies and stuff before, one typical thing they have at the end is some
things that players to do.
So we've got the modern house friends going and have a look, maybe like a playground.
Um, but also a lot of them have speed coils, so we're going to put them in from a toolbox.
And they also have walk speed parts where you can go on them, and they will change the speed that you're
walking at, which we are going to code ourselves.
Um, so let's have a look first at a, um, modern house to look at.
So let's go to models Structure House.
Let's see what we could pick from.
Um, we've got quite a large area here to pick from.
What about to what about this one here.
This one looks nice.
Um.
Think I might go for this one.
It's got all the interior.
He doesn't have an interior, then?
Um, so.
No, we don't want that.
Obviously you want one with an interior inside of it.
Um, a beach house.
This looks nice.
Does it have an interior, though?
No it doesn't.
We need we do need one of the interior.
Let's try.
Search up modern House that way instead.
Um.
Modern house.
Okay.
This contains 46 scripts, so I'm going to be very careful with those scripts.
Um, later on, in case they are viruses.
Um.
Okay.
This looks nice.
I think I'm going to keep with this one.
Perhaps.
Got a nice hint?
Um, the interior is okay.
But it's not the best you can see.
It's got a lot of a lot of empty space, especially here.
Um, very small bathroom.
Okay, let's try this one.
This is this is a bit more of a smaller one.
It's got 22 scripts.
We're going to have a look at those later on.
A bit smaller but looks nice and all the interior looks much better.
There's a lot more.
There's a lot less empty space and stuff.
Um, here's not the best maybe, but I mean, it's it's okay for what it is.
So we're going to stick with that one.
But, um, if you'd prefer a different one, that's completely fine.
Um, it's completely up to you to, like, change which one you'd like to use.
Okay.
Um, let's put this in place.
I'm going to put this in the corner.
Um, just up here.
Like right there, just so it's like, um, you.
So the player can't see the blank kind of walls here, so they can't see the back of the house.
And I think we need to just decrease the snap to grid feature slightly so we can put it in a bit more.
Just on the edge there.
Cool.
And this side already?
Pretty much there.
Just a little bit more.
However cool, and it's also flat on the ground as well.
Perfect.
So we've got this here in the corner of our place.
Nice.
Um, let's search back up like a park or a play area.
Something like that to add in.
It's going on to car park.
It's not what I wanted.
Um, what's this one, like 11 scripts.
So again, we need to look at this stuff.
Um, to make sure we want it all.
Um, I think I'm going to keep some some I'm going to keep some bits from this and put it down here
I think.
So these are models.
So we're going to have to individually select them.
This one I like.
So I'm going to move that over here.
This one there's no point keeping that.
The benches I don't think I'm going to keep picnic baskets.
Picnic benches.
Not going to keep a seesaw I don't think so.
I'm going to delete those ones.
Swing seats.
Sure.
Tire swing.
Sure.
And a tube slide.
Sure.
Okay, let's get rid of all these other parts and let's move them into place now as well.
Okay.
Um, so that's all we need to change the move properly to one.
Um.
Go.
You can turn collisions on so we know it's touched the ground nicely, and it should make sure that
it's flat with the ground as well.
It is cool and let's move it into place.
Let's be careful here because there are slides went on the player to slide off the map.
So we need to be careful where we are positioning this one.
So there's a slide two slides here and one slide here.
So if we were to rotate it like this would probably be the best mean.
Either way wherever we rotate it one of the slides are going to be basically off the map anyway.
So we might need to include like a fence or something like that around.
Um, but I think maybe like this might be the best one to do.
Again.
It's all you can.
All change it all.
It's completely fine.
I'm just adding some stuff in myself.
We didn't have enough room for the tube slides.
I'm going to get rid of that one.
And I'm just going to add in the swing set and stuff and put them around as well.
Um.
Maybe.
Here.
And make sure we got collisions on and take that to the ground.
And also the tire swing as well.
The reason why I'm not making these myself.
Firstly, um, they're not the easiest to make, I guess.
I mean, it doesn't look too difficult, but some of the curves and stuff are quite difficult to make.
Especially these curves here.
This most likely was not made from Roblox studio, but instead made.
Yes.
When you see meshes involved, it means it hasn't been made or usually means it hasn't been made.
In Roblox studio, it's been imported from other software, like we're going to have a look at blender
later on in the course.
Um, so that's why we're not really going to be looking at that.
Um, so let's drop that down, move that across, and then get this one as well.
Um.
Tire swing.
It just saves a lot of time as well.
You know, there's no point spending two lessons making some small additions to our hobby.
You want to spend that time on the major things like the actual stages.
Um.
But yeah.
Cool and think I'm quite happy with that there as well.
They all lined up nicely.
Cool.
So plenty of things that a player to do.
I'm going to go around and add some fences as well as well.
Um.
Let's see what kind of fence might be nice.
Like a wooden fence.
That's high enough that the player isn't going to get out.
Wooden fence.
Um, maybe.
I think it's a bit too high.
Almost.
Um.
See your other ones.
The low poly fence.
Um.
We could, I think, want to change some of the stuff, though.
Um, this is a difficult one.
This one.
Let's go for this one.
It's not as high as the other one.
I don't think so.
Let's rotate this.
Um, which way round?
Oh, they're both the same.
Same one.
Anyway.
And let's put this into place.
Like that and let's put it over place.
Put it in place here.
Now, I know this is inside the building here, but that's fine.
One, the player isn't going to be able to see that, or the player is going to be able to see, is
this here?
Okay.
And it just makes up nicely so the player can't properly see the edge of the map is the idea I'm looking
for here.
Okay.
And we're just going to go around and duplicate these now.
Now one tip for this.
The size of the fence um, is very useful in this case.
So let's have a look.
Um because it's a it might not be able to figure out the size of it or the size of this one along the
Z is, um.
0.4.
No has be 10.23.
So if you want to place multiple fences after each other instead of duplicating it and positioning each
one, why don't we set the move to 10.23?
And removing it one fence length each time, so it's that easy just to move it instead.
There's really handy tip that you can use.
And you see they're all organized up nicely like that there.
There's no gaps or anything, so it's perfect to do it nice and quick.
Um, a bit of an issue here at the edge.
So I think the best thing to do would be leave that for now and we'll go back to it and just adjust
the fence model a little bit afterwards.
Okay.
Let's rotate this one.
Um, and we need to turn change this to about 0.1 again just to move it back into position.
Then we'll change it back again to 10.23.
Um.
So let's get it nicely in positioned there.
And.
There as well.
Cool.
Change it back to 10.23 and then let's do it again.
So you can just see how something very small, such as changing the snap to grid, can really save you
a lot of time.
Um, so.
Yeah.
Can here.
We need to duplicate this.
Change this to 0.1.
Scale it around.
Move it into place.
Now, this time I'm going to start from here because I want it to.
I want to make sure that it's it stops here so the player can obviously get through from the spawn area.
Um.
So yeah.
10.23 duplicates and move into place.
Oh.
Go.
Okay.
And we can obviously adjust that later on as well.
Now handy tip here.
I know that it's 100 studs length and I know that this is in the center.
So instead of doing all that again let's just select all these duplicate change the move to 0.1 and
just move that into place.
Oh I forgot to select one.
Try again.
Okay.
Doesn't quite work as I imagined, but hopefully you can tell what I was meaning to do there.
Just saves a bit of time really.
When we're designing this, let's change this to 10.23.
Move into place.
Cool.
And let's do this again.
A bit repetitive now, but we're almost done and I think it'll look quite good afterwards.
This into place.
Cool.
Set this to 10.23 and let's keep duplicating it.
The reason why we can't just scale it and make one large fence is because if we were to scale it, you
can see what happens.
It gets larger on all axes because it's a it's a mesh.
It hasn't been made in robotics studio.
That's very typical for that.
Um, so we need to just make sure that's the reason why we're doing this, basically.
Um, and then up to here, we do have to be careful because we can't have it visible in the house.
We're just not.
So I'm happy just to leave it just like that.
Okay.
Because at the end of the day, even though it doesn't, even though it doesn't, it doesn't look the
best here.
It's not going to be visible from the house, and it's not going to be visible from the player either.
Even if they're right here, they can't see it, so the player can't see it.
Doesn't matter too much.
Doesn't have to be perfect.
Okay.
Right.
Let's adjust some of these fence parts man.
So this one here is overlapping a bit.
So what we can do is we can find the one at the end.
Let's delete that one.
Find where the middle section is.
Yeah.
And just scale that down a bit to fit into place.
So about there.
And I'm quite happy with that there now.
And let's just do the same for all the other ones as well.
So this one we've got a couple more to delete.
So any that are basically over the edge we're going to delete.
And in fines.
I think it's the part actually it is the part and scale it in.
Like that fair.
This is over slightly as well so we can do the same.
Find the fence panel, delete it and then scale down the part.
Okay.
And let's do it for the other corner over here as well.
This one, it's just these two here.
Deletes.
Delete and then move in the part.
Like that.
They're perfect.
And there we go.
We've got a nice fence going along here, and it looks quite nice already, to be honest.
Um, you probably notice in explorer I've got a lot of fence models going on, so let's just organize
this all nicely.
Um, I'm going to select all the fence panels here, and just to make sure I've selected all of them,
I'm going to move them all down.
And we can just check and make sure.
Yep that is all the fence panels.
So let's move it back up.
Let's group these as a folder and call these fences or just fence.
That would be fine.
And pop that into the finished folder there just so it's all nice and organized.
Then we have this model here which is our modern house or just call it house.
Let's put that into the finished folder.
And then this model here has all three of them.
So I'm actually going to ungroup this folder.
And this is the um I guess the slides.
This is the swing.
And this is the tire swing.
Um.
Oh, I shouldn't have done that.
Maybe.
Possibly.
Um.
Okay, I'm going to not do that.
Um.
Okay.
The reason why was a bit off about changing that is because when you have, um, objects with scripts
inside them, if you start changing around, um, if you start changing around the names of things,
it might not work, because obviously, if you reference the object, um, and you said game that workspace
dot model, dot tire swing and then you change it just to be called swing, it won't find it correctly.
So, um, unless we want to go through and change each of these scripts which don't want to, or we
can just quickly check, to be honest.
Um.
I can't see anything there to be honest about.
Should be good.
The best scripts shouldn't be affected by it.
But of course you don't even know how good these are going to be.
Um.
These reference via scripts and not game dot, so it doesn't matter what it is.
Um swing and this will be called slides.
Cool.
And of course, let's take all these three and put them into the finished folder.
And we've got two base plates.
Let's just call this one grass.
And there we go.
The only other bit I wanted to add in now are the walk speed parts.
And they're the bits that will be coding ourselves.
Okay.
So let's add our folder in and call these, um, walk speed parts.
Oh let's add in a part for this one over here.
Let's change the shape I'm going to change it to a cylinder and make this circular.
Change and move to one.
Why not start a nice one?
Six six?
Maybe 188.
Okay.
Was that too big?
I don't know.
Should be all right.
Let's use collisions when we get out of this to get it to the ground nicely.
And let's maybe change the height of it to be 0.5.
And again collision to get it back to the ground.
I'm quite happy with that.
So let's move it into place.
Pop it over here.
Looks nice.
Cool.
And I'm going to create a couple of these.
Um, let's say first one.
Now again we can look at the lengths of these.
This is eight.
Maybe doing by nine might be, might be the best one probably.
Yeah.
2345.
Six seven.
Let's do eight eight.
Cool.
And maybe we can add our, um, speed coils and stuff here.
Maybe.
Or maybe.
Perhaps there as well.
We can see.
Okay, all these parts here.
Let's have a look how we're going to do this.
Um.
Just thinking.
Um.
As to ways we could do this.
Basically, the best way to do it would probably be to script one for all of them, to create one script,
instead of creating lots of different scripts for each one, it's a bit more tricky.
We might need to add in some values, but shouldn't be too bad.
So let's add a script into here and I'm going to reference the parent.
So local walk speed paths is equal to script parent.
That's our model um inside.
So we're going to use a for icon of but basically basically allows us to like how we did with the um
lava parts back there, create the same script which will work for every single one.
But only difference in this case is it will be adjusting it slightly based on the walk speed.
Um, so for I comma part in pairs walk speed parts colon get children.
Um, I'm going for this a little bit quickly, but we have already done this very similar when we were
doing the lava parts.
So hopefully you already get the concept.
Okay.
To make sure that whatever object it is is a part.
So we're going to write this really bizarre code, which is if part is a part.
But of course we're meaning that for each part in the walk speed parts.
Um, so we're going to do that.
Um, so for each part in there we want to do a touch event.
So part.
Dot touched connect function.
We've done a lot of touched events during this game.
OBS are very touch based.
Um, so we're going to say yeah between humanoid again.
Yes we will do.
So I'm going to create a variable for it is equal to hit dot parent colon find first child humanoid.
Basically if you're going to need if you're going to need the humanoid again it's best to make it a
variable.
And then to say if humanoid then like that's fair.
Okay, so if there is a humanoid then we want to change a value from the humanoid.
Now I'm going to show you just by playing the game here it will throw an error, but that's fine.
Um.
Also gives gives us a chance to see if anything weird weird is happening based on if any of the scripts
we added in.
Have any issues with them.
Um, so yeah, in my character here, I have my humanoid, and my humanoid has a property called Walk
Speed.
Here we're going to reference that.
And that allows us to change the speed to be walk.
If I change this to 20 for example, we walk much faster, 30 so on.
And it's quite a fun thing for the player to do.
Let's stop the game.
Let's go to the script.
So, um, we need to we need to do this differently based on each of the different parts.
So, um, there's a couple of ways to do this.
We could name each one and say, um, Corbis Corbis part one and say, um, change the walk speed to
the name of the part it touched.
But it's a bit of a weird way to do it.
Um, because you're doing it based on the name.
It's not the most efficient way to do it.
How I would do it is by adding in a value.
So let's add in a um, integer or number.
We'll be adding in an integer value, and in this value we call this speed.
And this will be the walk speed that will be given the player.
It just makes a bit more sense when you look at it.
Um, so I think it's best to do it that way.
Let's copy this.
And instead of copying and pasting it individually, let's select all of them.
Right click paste into selected.
There we go.
And now we can change the walk speed of each one.
So I think the first one here let's change this to be one.
Uh, second one.
Let's change this to be ten.
Let's change this one to be 16, which is the default value.
Let's change this one to be 25.
This one to be 50.
This to be 100.
This one to be 200.
And it's going to be 500.
Obviously, this is completely bizarre.
Um, it's extremely fast, but players seem to enjoy it, so.
Um.
Sure.
Now the player isn't going to know the speed of each one.
So in each one we need to add in a billboard, which is similar to the surface guys we looked at, but
instead it appears on the top of the part, and we can just take it to a standard text label telling
it how the what the walk speed is basically, um.
Let's go.
Yeah.
So let's add in a text label and you can see it appearing there.
Okay.
We want to move it up.
So we can change the offset studs offset here.
Um, along the Y, I believe.
Yeah.
And we can see how far we want it up.
So maybe about five about there.
Looks quite nice.
Okay.
Let's go over to the text label.
These are properties you should be all familiar with already.
We're going to set the background transparency to be one.
Make it text scaled.
Change the text here to walk speed.
Colon one.
That's the walkspeed we've got here.
Change the font to a nice font.
Let's go for the same font we use for the other ones.
Keep it consistent and let's also maybe change the size a little bit.
Um, size one comma zero, one comma zero.
Let's change it to be 0.5, 0.5, maybe 0.8 then.
Yep.
And then because it's just me off center a tiny bit, we need to change the anchor points to be 0.50.5
and change the position to be 0.500.50.
Just so it's all in the middle.
Because remember on the anchor points, if the anchor point will mean it was slightly shifted to the
top left rather than based exactly in the center.
Okay.
Now as you go out and out, it will get larger and larger, which is obviously quite annoying.
So if we go into the billboard, there's a property somewhere if I can find it.
Max distance.
If you change this to maybe 100, for example, as we go out and out and out, it will eventually go
away.
So I think personally to maybe say about 50.
So about here you can see or maybe even like 30 I think must be best.
Yep.
Cool.
So again, let's copy this and paste it into all of the other ones.
Nice.
Um, and we're just going to adjust all the different or the different walk speeds.
The second one we set to be ten.
So let's change the text here to be ten.
Third one we changed B16.
So let's change this to be.
Uh, we'd change that back.
To be.
1651 we change to be 25.
So let's just go in, change it to 25, and just keep keep on doing that for the rest of them.
Um, so this one here.
50 was saying.
50.
This one here speeds 100.
We'll change that.
There to be 100.
This one here.
Speed is 200.
So we're going to change this to be 200.
And then finally this last one I think I've got to be 500.
Yeah.
Change was to be 500.
Cool.
There we go.
Now it's all just visual for the different parts, so I'm going to change them all to be neon.
You can select all of them and change the material to be neon.
Neon was neon and.
Cool.
And let's change all the colors.
Um, pick whatever colors you like.
Up to you.
Um.
Shouldn't pick some random colors personally.
Go blue.
Green.
A yellowy.
Brown.
Maybe I'm just picking some random colors.
White.
And then.
Like a light pink maybe.
There we go.
And several different walk.
Walk paths.
Walk speeds there.
All we need to do now is test these out.
So let's play the game and try this out.
Cool.
Let's go over to the first one.
Uh oh.
We haven't finished yet, have we?
No.
What am I on about?
You haven't done it yet?
Never mind.
Okay.
Um, so we're going to say humanoid dot walk speed, which is a property, is equal to instead of setting
instead of setting a number we're going to say is equal to part.
Dot speed.
Dot value, which is the value of the speed value inside each of the parts.
Cool.
Now hopefully it should work.
Um.
So let's play it and try out.
We load in?
Yep.
Warp speed of one.
Perfect.
Extremely slow.
A warp speed of ten is slow.
A bit slower than normal.
16 is your normal speed.
25 is a lot faster.
50 is double that speed.
So pretty fast.
Oh, I've got this.
Um.
That's 50.
100 is double that.
So.
Yep.
200 is this?
And 500.
Didn't want to know.
Yeah.
Really fast.
Oh.
So it's just it's a fun thing for players to to click on and try out.
Um, but yeah, um, and that's pretty much it for the finish area.
Okay.
So we've now completely finished, um, building our hobby.
Okay.
And in the next lesson we're going to do some final additions to it.
So namely the saving of the spawn points so that if you're on level three and you die, you respawn
on level three.
Um or.